package fr.umlv.ig.event;

import fr.umlv.ig.model.Line;

public abstract class LineDataEvent {
	private final Line line;
	private final int index0;
	private final int index1;
	
	public final static int INTERVAL_STATION_ADDED = 1;
	public final static int INTERVAL_ITINERARY_ADDED = 2;
		
	protected LineDataEvent(Line line,int type, int index0, int index1) {
		if(type != INTERVAL_ITINERARY_ADDED && type !=INTERVAL_STATION_ADDED) {
			throw new IllegalArgumentException("The type doesn't exist");
		}
		this.line = line;
		this.index0 = index0;
		this.index1 = index1;
	}

	
	public Line getLine() {
		return line;
	}

	
	public int getIndex0() {
		return index0;
	}

	
	public int getIndex1() {
		return index1;
	}

}
